using System;
using WineCellar.Core.Interfaces;

namespace WineCellar.Core.QueryObject
{
    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
    public class SearchAttribute : Attribute, ISearchParameter
    {
        private readonly string column;
        public string Column
        {
            get { return column; }
        }

        private readonly string method;
        public string Method
        {
            get { return method; }
        }

        public object Value { get; set; }

        public SearchAttribute(string method,string column)
        {
            this.column = column;
            this.method = method;
        }
    }

    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
    public sealed class LikeAttribute : SearchAttribute
    {
        public LikeAttribute(string column)
            : base("Like", column)
        {

        }
    }
}